﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LTSMZ.life.Model;
using LTSMZ.life.DAL;
using System.Data.SqlClient;
using System.Data;

namespace LTSMZ.life.BLL
{
    public class FirstTypeBll
    {
        FirstTypeDal dal = new FirstTypeDal();
        /// <summary>
        /// 一级类别显示
        /// </summary>
        /// <returns></returns>
        public List<FirstType> FirstTypeShow()
        {
            return dal.FirstTypeShow();
        }
        /// <summary>
        /// 添加一级类别
        /// </summary>
        /// <param name="f"></param>
        /// <returns></returns>
        //public int AddFirstType(FirstType f)
        //{
        //    return dal.AddFirstType(f);
        //}
        /// <summary>
        /// 删除一级类别
        /// </summary>
        /// <param name="Fid"></param>
        /// <returns></returns>
        //public int DelFirstType(int Fid)
        //{
        //    return dal.DelFirstType(Fid);
        //}
        /// <summary>
        /// 根据编号获取第一类别的信息（存储过程）
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public FirstType Get_FirsType(int id)
        {
            return dal.Get_FirsType(id);
        }
        /// <summary>
        /// 修改一级类别
        /// </summary>
        /// <param name="f"></param>
        /// <returns></returns>
        //public int UptFirstType(FirstType f)
        //{
        //    return dal.UptFirstType(f);
        //}
        /// <summary>
        /// 添加第一类别
        /// </summary>
        /// <param name="Fname"></param>
        /// <returns></returns>
        public int Add_FirsType(string Fname)
        {
            return dal.Add_FirsType(Fname);
        }
        /// <summary>
        /// 删除第一类别
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Del_FirsType(int id)
        {
            return dal.Del_FirsType(id);
        }
        /// <summary>
        /// 修改第一类别sqlhelper帮助类（存储过程）
        /// </summary>
        /// <param name="f"></param>
        /// <returns></returns>
        public int Upt_FitsType(FirstType f)
        {
            return dal.Upt_FitsType(f);
        }
        /// <summary>
        /// 显示五个类别名称
        /// </summary>
        /// <returns></returns>
        public List<FirstType> ShowFirsTypeTop5()
        {
            return dal.ShowFirsTypeTop5();
        }
    }
}
